import service from '../request.js'

export const uploadFile = file =>{
	return service({
		url: '/upload/toPdfFile',
		method: 'post',
		data: file
	})
}

export const file_add = data=>{
	return service({
		url: '/file/add',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const file_delete = data=>{
	return service({
		url: '/file/delete/'+data,
		method: 'delete'
	})
}

export const file_update = (id,data)=>{
	return service({
		url: '/file/update/'+ id,
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const file_fileListPages = data=>{
	return service({
		url: '/file/fileListPages',
		method: 'post',
		data: JSON.stringify(data)
	})
}

export const file_getFileList = ()=>{
	return service({
		url: '/file/getFileList',
		method: 'post'
	})
}

export const file_fileList = (data)=>{
	return service({
		url: '/file/fileList',
		method: 'post',
		data: JSON.stringify(data)
	})
}